Skip to content

Request for help #135

Answered by martin-san03
martin-san03 asked this question in Q&A
Oct 15, 2022 · 3 comments · 6 replies
Discussion options

You must be logged in to vote

I was missing a auth v1 grant in the database. Now it is functionning correctly, excepting for one thing. The value show in grafana or influxdb UI is incorrect, it seems influxdb uses a reference to the value provided to Point.addField, but the variable was a temporal one.
This is my code:

    // convert bytes in memory into appropiate type
    static bool addValue(influxdb::Point* point, const char * fieldName, const char* typeName, const char* addr)
    {
        bool result = true;

        if (::strcmp(typeName, "int8_t") == 0)
            point->addField(fieldName, (int)*reinterpret_cast<const int8_t*>(addr));
        else if (::strcmp(typeName, "int16_t") == 0)
            point->ad…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@offa
Comment options

@martin-san03
Comment options

@martin-san03
Comment options

@martin-san03
Comment options

@offa
Comment options

Answer selected by martin-san03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants