kdriveExpress SDK 23.2.0
kdriveExpress M_Property API

Functions

kdriveExpress_API error_t kdrive_ap_m_prop_read (int32_t ap, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, uint8_t nr_of_elems, uint16_t start_index, uint8_t data[], uint32_t *data_length)
 
kdriveExpress_API error_t kdrive_ap_m_prop_write (int32_t ap, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, uint8_t nr_of_elems, uint16_t start_index, const uint8_t data[], uint32_t data_length, uint8_t *return_code)
 
kdriveExpress_API error_t kdrive_ap_m_func_prop_command (int32_t ap, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, const uint8_t input_data[], uint32_t input_data_length, uint8_t *return_code, uint8_t output_data[], uint32_t *output_data_length)
 
kdriveExpress_API error_t kdrive_ap_m_func_prop_state_read (int32_t ap, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, const uint8_t input_data[], uint32_t input_data_length, uint8_t *return_code, uint8_t output_data[], uint32_t *output_data_length)
 

Detailed Description

Function Documentation

◆ kdrive_ap_m_func_prop_command()

kdriveExpress_API error_t kdrive_ap_m_func_prop_command ( int32_t  ap,
uint16_t  object_type,
uint16_t  object_instance,
uint16_t  prop_id,
const uint8_t  input_data[],
uint32_t  input_data_length,
uint8_t return_code,
uint8_t  output_data[],
uint32_t output_data_length 
)
Calls a function property of an interface object in a device via M_FuncProp_Command service.
The output_data buffer must exist (should be pre-allocated by the user) and its size
should be equal to or greater than the output value of the function response.
The max size of the buffer must be passed in as output_data_length.
output_data_length will be updated to correspond to the length of the value response.
\note Only available in the Commercial kdriveExpress SDK
\param [in] ap the access port descriptor
\param [in] object_type object type
Parameters
[in]object_instanceobject instance
[in]prop_idproperty id
[in]input_datathe function specific input data
[in]input_data_lengththe length of the input_data array
[out]return_codereturn code
[out]output_datathe function specific output data
[in,out]output_data_lengththe output_data array capacity (in) and actual length of the output_data array (out)
Returns
KDRIVE_ERROR_NONE if the service was successful or the error code if an error was raised

◆ kdrive_ap_m_func_prop_state_read()

kdriveExpress_API error_t kdrive_ap_m_func_prop_state_read ( int32_t  ap,
uint16_t  object_type,
uint16_t  object_instance,
uint16_t  prop_id,
const uint8_t  input_data[],
uint32_t  input_data_length,
uint8_t return_code,
uint8_t  output_data[],
uint32_t output_data_length 
)
Calls a function property of an interface object in a device via M_FuncProp_StateRead service.
The output_data buffer must exist (should be pre-allocated by the user) and its size
should be equal to or greater than the output value of the function response.
The max size of the buffer must be passed in as output_data_length.
output_data_length will be updated to correspond to the length of the value response.
\note Only available in the Commercial kdriveExpress SDK
\param [in] ap the access port descriptor
Parameters
[in]object_typeobject type
[in]object_instanceobject instance
[in]prop_idproperty id
[in]input_datathe function specific input data
[in]input_data_lengththe length of the input_data array
[out]return_codereturn code
[out]output_datathe function specific output data
[in,out]output_data_lengththe output_data array capacity (in) and actual length of the output_data array (out)
Returns
KDRIVE_ERROR_NONE if the service was successful or the error code if an error was raised

◆ kdrive_ap_m_prop_read()

kdriveExpress_API error_t kdrive_ap_m_prop_read ( int32_t  ap,
uint16_t  object_type,
uint16_t  object_instance,
uint16_t  prop_id,
uint8_t  nr_of_elems,
uint16_t  start_index,
uint8_t  data[],
uint32_t data_length 
)
Reads a property value from a device via M_Prop_Read service.
The data buffer must exist (should be pre-allocated by the user) and its size
should be equal to or greater than the property value to be read.
The max size of the buffer must be passed in as data_length.
data_length will be updated to correspond to the length of the value read.
\note Only available in the Commercial kdriveExpress SDK
\param [in] ap the access port descriptor
\param [in] object_type object type
Parameters
[in]object_instanceobject instance
[in]prop_idProperty ID
[in]nr_of_elemsElement Count
[in]start_indexStart Index
[out]datathe property value read from the device
[in,out]data_lengththe data array capacity (in) and actual length of the data array (out)
Returns
KDRIVE_ERROR_NONE if the service was successful or the error code if an error was raised

◆ kdrive_ap_m_prop_write()

kdriveExpress_API error_t kdrive_ap_m_prop_write ( int32_t  ap,
uint16_t  object_type,
uint16_t  object_instance,
uint16_t  prop_id,
uint8_t  nr_of_elems,
uint16_t  start_index,
const uint8_t  data[],
uint32_t  data_length,
uint8_t return_code 
)
Writes the value of a property to a device via M_Prop_Write service.
This service waits for the response.
\note Only available in the Commercial kdriveExpress SDK
\param [in] ap the access port descriptor
\param [in] object_type object type
Parameters
[in]object_instanceobject instance
[in]prop_idproperty id
[in]nr_of_elemselement count
[in]start_indexstart index
[in]datathe data array
[in]data_lengththe length of the data array
[out]return_codethe return code from the device
Returns
KDRIVE_ERROR_NONE if the service was successful or the error code if an error was raised