Store Endpoint¶
The store provides a flat file system on modules that have storage capacity.
Files are referred to as slots and they have simple zero-based numbers for access.
Store slots can be used for generalized storage and commonly contain compiled reflex code (files ending in .map) or templates used by the system.
Slots simply contain bytes with no expected organization but the code or use of the slot may impose a structure.
Stores have fixed indices based on type.
Not every module contains a store of each type. Consult the module datasheet for details on which specific stores are implemented, if any, and the capacities of implemented stores.
See the Store Entity for generic information.
- GET /api/v1/brainstem/(serial_num)/store/(index)/slotstate/(slot)¶
Get slot state.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
slot – The slot number.
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/store/(index)/slotenable¶
Enable slot.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/store/(index)/slotdisable¶
Disable slot.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/store/(index)/lock/(slot)¶
Gets the current lock state of the slot
Allows for write protection on a slot.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
slot – The slot number
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/store/(index)/lock/(slot)¶
Sets the locked state of the slot
Allows for write protection on a slot.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
slot – The slot number
- Request JSON Object:
value (boolean) –
Boolean value to set.
May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value