Modbus Vault v1.0
Loading...
Searching...
No Matches
serializer.c File Reference

Implementation of the serializer. More...

#include "serializer.h"
#include "modbus.pb-c.h"
Include dependency graph for serializer.c:

Functions

esp_err_t serializer_pack (const slab_pool_t *src_ptr, int64_t timestamp_us, slab_pool_t *dst_ptr)
 Serialize raw data.
 

Detailed Description

Implementation of the serializer.

Serialize Modbus frame into predefined structure ready to send

Function Documentation

◆ serializer_pack()

esp_err_t serializer_pack ( const slab_pool_t src_ptr,
int64_t  timestamp_us,
slab_pool_t dst_ptr 
)

Serialize raw data.

Parameters
src_ptrPointer to raw data
timestamp_usRaw data timestamp
dst_ptrPointer to packing buffer
Returns
esp_err_t
Return values
ESP_OKSerialize success
ESP_ERR_INVALID_ARGProvided invalid argument(s)
ESP_ERR_NO_MEMNo available space in destination
Here is the caller graph for this function: