Reference   Language | Libraries | Comparison | Changes

Bridge : Bridge Class

get()

Description

get() allows you to read a key/value item previously saved on the Linux processor. You can request for a value stored in the datastore by passing get() the Key you want to search for, the support buffer, and its size. The Key is similar to a label, used to identify an associated value. The key name must be unique in order to identify the correct value.

The datastore is saved in RAM, you will lose the datastore when you restart the bridge software on the Linux side (through power cycling, resetting the Linux processor, or uploading a sketch through WiFi or Ethernet). You will not lose the datastore if you reset the ATMega32u4 processor.

Syntax

bridge.get(key, buffer, buffer_length)

Parameters

key: The name of the key associated with the value you are requesting.

buffer: The support buffer used to save the value returned from the searched Key. A string terminator is added after the last byte that compose the value filed has been read.

buffer_length: the length of the buffer passed to the function.

Returns

The function returns the length of the read byte of the requested value.

See Also

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Share