IBP_WRITE and IBP_STORE

Stores data in the allocation defined by the write capability - key/typekey. The IBP_STORE command always appends data to the allocation unless the allocation is of type IBP_BUFFER. The IBP_WRITE command adds the ability to provide an offset for the write.

These are blocking calls that only return when the required size of data is successfully stored in the allocation, or an error causes the call to abort prematurely. The offset is only used for allocations of type IBP_BYTEARRAY. For all other allocation types the IBP_WRITE command behaves the same as the IBP_STORE command.

If the allocation type is IBP_FIFO or IBP_CIRQ it is possible to have a length greater than the max allocation size. In this case the depot will block when the allocation becomes full until a reader consumes the allocation’s data.

Protocol for IBP_WRITE

Client Sends version IBP_WRITE key typekey offset length timeout n
Server Responds status n
Client Sends …raw data stream…
Server Responds status bytes_readn

Protocol for IBP_STORE

Client Sends version IBP_STORE key typekey length timeout n
Server Responds status n
Client Sends …raw data stream…
Server Responds status bytes_readn

Parameters

offset
Write offset into the allocation for storing data. Only valid for IBP_BYTEARRAY allocations.
length
Amount of data to store.
L-Store Documentation