Skip to content

Read single item #127

@WirelessSwitcher

Description

@WirelessSwitcher

I've been looking into a way to read one or a few booleans and although I managed to use the "conn.readAllItems(valuesReady);", I would like to bind the logged values to variables, so I could send them back to my client.

console.log("\n\n\nTrying to read something here");
conn.addItems(["TEST3"]);
let read = conn.readAllItems(valuesReady);
console.log("Read is: " + read); // this results in "Read is: Undefined"

I also tried to modify the valuesReady function:

function valuesReady(anythingBad, values) {

if (anythingBad) { console.log("SOMETHING WENT WRONG READING VALUES!!!!"); }
//console.log(values);
doneReading = true;
//if (doneWriting) { process.exit(); }
return values;

}

But again, no success.

Does anyone knows how can I get a readable value?
Maybe I could even contribute to some specific code if there's no such a function to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions