|
@@ -13,6 +13,20 @@ extern "C" {
|
|
|
|
|
|
typedef UA_StatusCode (*UA_exchangeEncodeBuffer)(void *handle, UA_Byte **bufPos, const UA_Byte **bufEnd);
|
|
|
|
|
|
+/* Encode the data scalar (or structure) described by type in the binary
|
|
|
+ * encoding.
|
|
|
+ *
|
|
|
+ * @param data Points to the data.
|
|
|
+ * @param type Points to the type description.
|
|
|
+ * @param buf_pos Points to a pointer to the current position in the encoding buffer.
|
|
|
+ * Must not be NULL. The pointer is advanced by the number of encoded bytes, or,
|
|
|
+ * if the buffer is exchanged, to the position in the new buffer.
|
|
|
+ * @param buf_end Points to a pointer to the end of the encoding buffer (encoding always stops
|
|
|
+ * before *buf_end). Must not be NULL. The pointer is changed when the buffer is exchanged.
|
|
|
+ * @param exchangeCallback Function that is called when the end of the encoding
|
|
|
+ * buffer is reached.
|
|
|
+ * @param exchangeHandle Custom data passed intp the exchangeCallback.
|
|
|
+ * @return Returns a statuscode whether encoding succeeded. */
|
|
|
UA_StatusCode
|
|
|
UA_encodeBinary(const void *src, const UA_DataType *type,
|
|
|
UA_Byte **bufPos, const UA_Byte **bufEnd,
|