Added udsGetNetworkStructApplicationData().
This commit is contained in:
parent
9ad6e0945c
commit
db6432ce0a
@ -184,6 +184,14 @@ Result udsSetApplicationData(u8 *buf, u32 size);
|
|||||||
*/
|
*/
|
||||||
Result udsGetApplicationData(u8 *buf, u32 size, u32 *actual_size);
|
Result udsGetApplicationData(u8 *buf, u32 size, u32 *actual_size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata.
|
||||||
|
* @param buf Appdata buffer.
|
||||||
|
* @param size Max size of the output buffer.
|
||||||
|
* @param actual_size If set, the actual size of the appdata written into the buffer is stored here.
|
||||||
|
*/
|
||||||
|
Result udsGetNetworkStructApplicationData(udsNetworkStruct *network, u8 *buf, u32 size, u32 *actual_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create a bind.
|
* @brief Create a bind.
|
||||||
* @param bindcontext The output bind context.
|
* @param bindcontext The output bind context.
|
||||||
|
@ -662,6 +662,18 @@ Result udsGetApplicationData(u8 *buf, u32 size, u32 *actual_size)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result udsGetNetworkStructApplicationData(udsNetworkStruct *network, u8 *buf, u32 size, u32 *actual_size)
|
||||||
|
{
|
||||||
|
if(network->appdata_size > sizeof(network->appdata))return -1;
|
||||||
|
if(size > network->appdata_size)size = network->appdata_size;
|
||||||
|
|
||||||
|
if(buf)memcpy(buf, network->appdata, size);
|
||||||
|
|
||||||
|
if(actual_size)*actual_size = size;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static Result udsipc_Bind(udsBindContext *bindcontext, u32 input0, u8 input1, u16 NetworkNodeID)//input0 and input1 are unknown.
|
static Result udsipc_Bind(udsBindContext *bindcontext, u32 input0, u8 input1, u16 NetworkNodeID)//input0 and input1 are unknown.
|
||||||
{
|
{
|
||||||
u32* cmdbuf=getThreadCommandBuffer();
|
u32* cmdbuf=getThreadCommandBuffer();
|
||||||
|
Loading…
Reference in New Issue
Block a user