kdriveExpress SDK 23.2.0
kdrive_express_services.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2002-2023 WEINZIERL ENGINEERING GmbH
3 // All rights reserved.
4 //
5 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7 // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
8 // SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY,
9 // WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
10 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
11 //
12 
13 #ifndef __KDRIVE_EXPRESS_SERVICES_H__
14 #define __KDRIVE_EXPRESS_SERVICES_H__
15 
16 #include "kdrive_express_config.h"
17 #include "kdrive_express_defs.h"
18 
26 #if KDRIVE_EXPRESS_SERVICES_INCLUDED == 1
27 
28 #define KDRIVE_LOAD_STATE_ADDITIONAL_INFO_LEN (9)
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /**************************************************************
35 ** Init
36 ***************************************************************/
37 
50 
61 
62 /**************************************************************
63 ** Device Services: Response Timeout
64 ***************************************************************/
65 
74 
82 
83 /**************************************************************
84 ** Device Services: Connection-oriented
85 ***************************************************************/
86 
95 
104 
105 /**************************************************************
106 ** Device Services: Max APDU length (for long frames support)
107 ***************************************************************/
108 
117 
125 
126 /**************************************************************
127 ** Device Services: Extended memory services used
128 ** Newer devices supports new extended memory services with long frames
129 ***************************************************************/
130 
141 
151 
152 /**************************************************************
153 ** Device Service: DeviceDescriptorType0Read
154 ***************************************************************/
155 
166  uint16_t* mask_version);
167 
168 /**************************************************************
169 ** Device Service: DeviceDescriptorType2Read
170 ***************************************************************/
171 
178 {
193 
204  uint16_t ind_addr, device_descriptor_type2_t* desc);
205 
206 /**************************************************************
207 ** Device Service: RestartDeviceType0
208 ***************************************************************/
209 
220 
221 /**************************************************************
222 ** Device Service: RestartDeviceType1
223 ***************************************************************/
224 
238  uint16_t ind_addr,
239  uint8_t erase_code,
240  uint8_t channel_number,
241  uint8_t* error_code,
242  uint16_t* process_time);
243 
244 /**************************************************************
245 ** Device Service: PropertyDescriptionRead
246 ***************************************************************/
247 
254 {
264 
278  uint16_t ind_addr,
279  uint8_t object_index,
280  uint8_t prop_id,
281  uint8_t prop_index,
282  property_description_t* property_description);
283 
284 /**************************************************************
285 ** Device Service: PropertyValueRead
286 ***************************************************************/
287 
306  uint16_t ind_addr,
307  uint8_t object_index,
308  uint8_t prop_id,
309  uint8_t nr_of_elems,
310  uint16_t start_index,
311  uint8_t data[],
312  uint32_t* data_length);
313 
314 /**************************************************************
315 ** Device Service: PropertyValueWrite
316 ***************************************************************/
317 
332  uint16_t ind_addr,
333  uint8_t object_index,
334  uint8_t prop_id,
335  uint8_t nr_of_elems,
336  uint16_t start_index,
337  const uint8_t data[],
338  uint32_t data_length);
339 
362  uint16_t ind_addr,
363  uint8_t object_index,
364  uint8_t prop_id,
365  uint8_t nr_of_elems,
366  uint16_t start_index,
367  const uint8_t input_data[],
368  uint32_t input_data_length,
369  uint8_t output_data[],
370  uint32_t* output_data_length);
371 
372 /**************************************************************
373 ** Device Service: FunctionPropertyCommand
374 ***************************************************************/
375 
396  uint16_t ind_addr,
397  uint8_t object_index,
398  uint8_t prop_id,
399  const uint8_t input_data[],
400  uint32_t input_data_length,
401  uint8_t* return_code,
402  uint8_t output_data[],
403  uint32_t* output_data_length);
404 
405 /**************************************************************
406 ** Device Service: FunctionPropertyStateRead
407 ***************************************************************/
408 
429  uint16_t ind_addr,
430  uint8_t object_index,
431  uint8_t prop_id,
432  const uint8_t input_data[],
433  uint32_t input_data_length,
434  uint8_t* return_code,
435  uint8_t output_data[],
436  uint32_t* output_data_length);
437 
438 /**************************************************************
439 ** Device Service: ExtendedPropertyDescriptionRead
440 ***************************************************************/
441 
448 {
460 
461 
476  uint16_t ind_addr,
477  uint16_t object_type,
478  uint16_t object_instance,
479  uint16_t prop_id,
480  uint16_t prop_index,
481  ext_property_description_t* property_description);
482 
483 /**************************************************************
484 ** Device Service: ExtendedPropertyValueRead
485 ***************************************************************/
486 
507  uint16_t ind_addr,
508  uint16_t object_type,
509  uint16_t object_instance,
510  uint16_t prop_id,
511  uint8_t nr_of_elems,
512  uint16_t start_index,
513  uint8_t data[],
514  uint32_t* data_length);
515 
516 /**************************************************************
517 ** Device Service: ExtendedPropertyValueWrite
518 ***************************************************************/
519 
538  uint16_t ind_addr,
539  uint16_t object_type,
540  uint16_t object_instance,
541  uint16_t prop_id,
542  uint8_t nr_of_elems,
543  uint16_t start_index,
544  const uint8_t data[],
545  uint32_t data_length,
546  uint8_t* return_code);
547 
565  uint16_t ind_addr,
566  uint16_t object_type,
567  uint16_t object_instance,
568  uint16_t prop_id,
569  uint8_t nr_of_elems,
570  uint16_t start_index,
571  const uint8_t data[],
572  uint32_t data_length);
573 
574 /**************************************************************
575 ** Device Service: ExtendedFunctionPropertyCommand
576 ***************************************************************/
577 
599  uint16_t ind_addr,
600  uint16_t object_type,
601  uint16_t object_instance,
602  uint16_t prop_id,
603  const uint8_t input_data[],
604  uint32_t input_data_length,
605  uint8_t* return_code,
606  uint8_t output_data[],
607  uint32_t* output_data_length);
608 
609 /**************************************************************
610 ** Device Service: FunctionPropertyStateRead
611 ***************************************************************/
612 
634  uint16_t ind_addr,
635  uint16_t object_type,
636  uint16_t object_instance,
637  uint16_t prop_id,
638  const uint8_t input_data[],
639  uint32_t input_data_length,
640  uint8_t* return_code,
641  uint8_t output_data[],
642  uint32_t* output_data_length);
643 
644 /**************************************************************
645 ** Device Service: MemoryRead
646 ***************************************************************/
647 
665  uint16_t ind_addr,
666  uint16_t memory_addr,
667  uint8_t number,
668  uint8_t data[],
669  uint32_t* data_length);
670 
671 /**************************************************************
672 ** Device Service: MemoryWrite
673 ***************************************************************/
674 
689  uint16_t ind_addr,
690  uint16_t memory_addr,
691  const uint8_t data[],
692  uint32_t data_length);
693 
714  uint16_t ind_addr,
715  uint16_t memory_addr,
716  const uint8_t input_data[],
717  uint32_t input_data_length,
718  uint8_t output_data[],
719  uint32_t* output_data_length);
720 
721 /**************************************************************
722 ** Device Service: UserMemoryRead
723 ***************************************************************/
724 
742  uint16_t ind_addr,
743  uint32_t memory_addr,
744  uint8_t number,
745  uint8_t data[],
746  uint32_t* data_length);
747 
748 /**************************************************************
749 ** Device Service: UserMemoryWrite
750 ***************************************************************/
751 
764  uint16_t ind_addr,
765  uint32_t memory_addr,
766  const uint8_t data[],
767  uint32_t data_length);
768 
789  uint16_t ind_addr,
790  uint32_t memory_addr,
791  const uint8_t input_data[],
792  uint32_t input_data_length,
793  uint8_t output_data[],
794  uint32_t* output_data_length);
795 
796 /**************************************************************
797 ** Device Service: ExtendedMemoryRead
798 ***************************************************************/
799 
817  uint16_t ind_addr,
818  uint32_t memory_addr,
819  uint8_t number,
820  uint8_t data[],
821  uint32_t* data_length);
822 
823 /**************************************************************
824 ** Device Service: ExtendedMemoryWrite
825 ***************************************************************/
826 
840  uint16_t ind_addr,
841  uint32_t memory_addr,
842  const uint8_t data[],
843  uint32_t data_length);
844 
845 /**************************************************************
846 ** Device Service: AuthorizeRequest
847 ***************************************************************/
848 
860  uint16_t ind_addr,
861  uint32_t key,
862  uint8_t* level);
863 
864 /**************************************************************
865 ** Device Service: KeyWrite
866 ***************************************************************/
867 
879  uint16_t ind_addr,
880  uint8_t* level,
881  uint32_t key);
882 
883 /**************************************************************
884 ** Device Service: IsIndividualAddressFree
885 ***************************************************************/
886 
896  uint16_t ind_addr,
897  bool_t* is_free);
898 
899 /**************************************************************
900 ** Device Service: LoadStateRead
901 ***************************************************************/
902 
914  uint16_t ind_addr,
915  uint8_t object_index,
916  uint8_t* load_state);
917 
918 /**************************************************************
919 ** Device Service: LoadStateWrite
920 ***************************************************************/
921 
934  uint16_t ind_addr,
935  uint8_t object_index,
936  uint8_t load_event,
937  uint8_t* load_state);
938 
952  uint16_t ind_addr,
953  uint8_t object_index,
954  uint8_t load_event,
955  const uint8_t additional_info[KDRIVE_LOAD_STATE_ADDITIONAL_INFO_LEN],
956  uint8_t* load_state);
957 
958 /**************************************************************
959 ** Device Service: ReadProgMode
960 ***************************************************************/
961 
973  uint16_t ind_addr,
974  bool_t* enabled);
975 
989  uint16_t ind_addr,
990  uint16_t mask_version,
991  bool_t* enabled);
992 
1003  uint16_t ind_addr,
1004  bool_t* enabled);
1005 
1016  uint16_t ind_addr,
1017  bool_t* enabled);
1018 
1019 /**************************************************************
1020 ** Device Service: SwitchProgMode
1021 ***************************************************************/
1022 
1034  uint16_t ind_addr,
1035  bool_t enable);
1036 
1037 
1051 
1064  uint16_t ind_addr,
1065  bool_t enable);
1066 
1079  uint16_t ind_addr,
1080  bool_t enable);
1081 
1082 /**************************************************************
1083 ** Device Service: MemoryBlockRead
1084 ***************************************************************/
1085 
1131  uint16_t ind_addr,
1132  uint32_t* memory_addr,
1133  uint8_t number,
1134  uint8_t data[],
1135  uint32_t* data_length);
1136 
1137 /**************************************************************
1138 ** Device Service: MemoryBlockWrite
1139 ***************************************************************/
1140 
1162  uint16_t ind_addr,
1163  uint32_t memory_addr,
1164  const uint8_t data[],
1165  uint32_t data_length);
1166 
1167 /**************************************************************
1168 ** Broadcast Service: IndividualAddressProgModeRead
1169 ***************************************************************/
1170 
1186  uint32_t wait_time,
1187  uint16_t data[],
1188  uint32_t* data_length);
1189 
1190 /**************************************************************
1191 ** Broadcast Service: IndividualAddressProgModeWrite
1192 ***************************************************************/
1193 
1207 
1208 /**************************************************************
1209 ** Broadcast Service: IndividualAddressSerialNumberRead
1210 ***************************************************************/
1211 
1222  const uint8_t sn[KDRIVE_SN_LEN],
1223  uint16_t* ind_addr);
1224 
1225 /**************************************************************
1226 ** Broadcast Service: IndividualAddressSerialNumberWrite
1227 ***************************************************************/
1228 
1239  const uint8_t sn[KDRIVE_SN_LEN],
1240  uint16_t new_ind_addr);
1241 
1242 /**************************************************************
1243 ** Broadcast Service: NetworkParameterWriteBroadcast
1244 ***************************************************************/
1245 
1260  uint16_t object_type,
1261  uint8_t prop_id,
1262  const uint8_t data[],
1263  uint32_t data_length);
1264 
1265 /**************************************************************
1266 ** System Broadcast Service: NetworkParameterWriteBroadcast
1267 ***************************************************************/
1268 
1283  uint16_t object_type,
1284  uint8_t prop_id,
1285  const uint8_t data[],
1286  uint32_t data_length);
1287 
1288 /**************************************************************
1289 ** System Broadcast Service: SystemNetworkParameterWrite
1290 ***************************************************************/
1291 
1304  uint16_t object_type,
1305  uint16_t prop_id,
1306  const uint8_t data[],
1307  uint32_t data_length);
1308 
1309 /**************************************************************
1310 ** System Broadcast Service: SystemNetworkParameterRead
1311 ***************************************************************/
1312 
1321 {
1327 
1343  uint16_t object_type,
1344  uint16_t prop_id,
1345  const uint8_t data[],
1346  uint32_t data_length,
1347  uint32_t wait_time,
1349  uint32_t* items_length);
1350 
1351 /**************************************************************
1352 ** System Broadcast Service: DomainAddressProgModeRead
1353 ***************************************************************/
1354 
1363 {
1369 
1382  uint32_t wait_time,
1384  uint32_t* items_length);
1385 
1386 /**************************************************************
1387 ** System Broadcast Service: DomainAddressProgModeWrite
1388 ***************************************************************/
1389 
1402 
1403 /**************************************************************
1404 ** System Broadcast Service: DomainAddressSerialNumberRead
1405 ***************************************************************/
1406 
1419  const uint8_t sn[KDRIVE_SN_LEN],
1420  uint16_t* ind_addr,
1421  uint8_t da[KDRIVE_DA_LEN]);
1422 
1423 /**************************************************************
1424 ** System Broadcast Service: DomainAddressSerialNumberWrite
1425 ***************************************************************/
1426 
1438  const uint8_t sn[KDRIVE_SN_LEN],
1439  const uint8_t da[KDRIVE_DA_LEN]);
1440 
1441 #ifdef __cplusplus
1442 }
1443 #endif
1444 
1445 #endif /* KDRIVE_EXPRESS_SERVICES_INCLUDED == 1 */
1446 #endif /* __KDRIVE_EXPRESS_SERVICES_H__ */
kdriveExpress_API error_t kdrive_sp_switch_prog_mode(int32_t sp, uint16_t ind_addr, bool_t enable)
Enable / Disable the programming mode (switches the learn LED).
kdriveExpress_API error_t kdrive_sp_ext_prop_value_write_uncon(int32_t sp, uint16_t ind_addr, 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)
kdriveExpress_API error_t kdrive_sp_function_property_command(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_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.
kdriveExpress_API error_t kdrive_sp_function_property_state_read(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_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.
kdriveExpress_API error_t kdrive_sp_system_network_param_write(int32_t sp, uint16_t object_type, uint16_t prop_id, const uint8_t data[], uint32_t data_length)
Writes a system parameter with the SystemNetworkParameterWrite service.
kdriveExpress_API error_t kdrive_sp_network_param_write_broadcast(int32_t sp, uint16_t object_type, uint8_t prop_id, const uint8_t data[], uint32_t data_length)
Writes a parameter with the NetworkParameterWriteBroadcast service.
struct system_network_param_read_t system_network_param_read_t
Structure holding individual address and test info and test result for the SystemNetworkParameterRead...
kdriveExpress_API error_t kdrive_sp_key_write(int32_t sp, uint16_t ind_addr, uint8_t *level, uint32_t key)
Writes an authorization key.
kdriveExpress_API error_t kdrive_sp_load_state_write(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t load_event, uint8_t *load_state)
Writes the load state via PropertyValueWrite (PID_LOAD_STATE_CONTROL).
kdriveExpress_API error_t kdrive_sp_memory_block_write(int32_t sp, uint16_t ind_addr, uint32_t memory_addr, const uint8_t data[], uint32_t data_length)
Writes a contiguous memory block via DMA.
kdriveExpress_API error_t kdrive_sp_ext_function_property_command(int32_t sp, uint16_t ind_addr, 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_sp_switch_prog_mode_mask_based(int32_t sp, uint16_t ind_addr, uint16_t mask_version, bool_t enable)
Enable / Disable the programming mode (switches the learn LED).
kdriveExpress_API error_t kdrive_sp_domain_addr_prog_mode_read(int32_t sp, uint32_t wait_time, domain_addr_prog_mode_read_t items[], uint32_t *items_length)
Reads the Domain Addresses of devices in Programming Mode (i.e.
kdriveExpress_API error_t kdrive_is_ind_addr_free(int32_t sp, uint16_t ind_addr, bool_t *is_free)
Checks if the given individual address is free (not used by a device on the bus)
kdriveExpress_API error_t kdrive_sp_set_response_timeout(int32_t sp, uint32_t timeout)
Sets the response timeout.
kdriveExpress_API error_t kdrive_sp_set_ext_memory_services_used(int32_t sp, bool_t ext_used)
Sets whether the memory block services use the (new) extended memory services or the 'normal' memory ...
kdriveExpress_API error_t kdrive_sp_set_max_apdu_length(int32_t sp, uint32_t max_apdu_length)
Sets the maximum apdu length for device services.
kdriveExpress_API error_t kdrive_sp_ext_prop_value_write(int32_t sp, uint16_t ind_addr, 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_sp_user_memory_write(int32_t sp, uint16_t ind_addr, uint32_t memory_addr, const uint8_t data[], uint32_t data_length)
Writes data via DMA.
kdriveExpress_API error_t kdrive_sp_read_prog_mode_mask_based(int32_t sp, uint16_t ind_addr, uint16_t mask_version, bool_t *enabled)
Reads the current programming mode.
kdriveExpress_API error_t kdrive_sp_ext_prop_value_read(int32_t sp, uint16_t ind_addr, 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)
struct domain_addr_prog_mode_read_t domain_addr_prog_mode_read_t
Structure holding individual address, serial number, domain address for the DomainAddressProgModeRead...
kdriveExpress_API error_t kdrive_sp_user_memory_write_without_verify(int32_t sp, uint16_t ind_addr, uint32_t memory_addr, const uint8_t input_data[], uint32_t input_data_length, uint8_t output_data[], uint32_t *output_data_length)
Writes data via DMA.
kdriveExpress_API error_t kdrive_sp_ext_function_property_state_read(int32_t sp, uint16_t ind_addr, 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_sp_ind_addr_sn_read(int32_t sp, const uint8_t sn[KDRIVE_SN_LEN], uint16_t *ind_addr)
Reads the individual address of a device that matches the specified Serial Number.
kdriveExpress_API bool_t kdrive_sp_is_co(int32_t sp)
Returns whether the device services are run as connection-oriented or connection-less.
kdriveExpress_API error_t kdrive_sp_restart_device_type0(int32_t sp, uint16_t ind_addr)
Restarts the device using restart (type 0) There is no response to this telegram so it is not possibl...
kdriveExpress_API error_t kdrive_sp_user_memory_read(int32_t sp, uint16_t ind_addr, uint32_t memory_addr, uint8_t number, uint8_t data[], uint32_t *data_length)
Reads data via DMA.
kdriveExpress_API error_t kdrive_sp_ext_memory_read(int32_t sp, uint16_t ind_addr, uint32_t memory_addr, uint8_t number, uint8_t data[], uint32_t *data_length)
Reads data via A_Extended_Memory_Read service.
kdriveExpress_API error_t kdrive_sp_memory_block_read(int32_t sp, uint16_t ind_addr, uint32_t *memory_addr, uint8_t number, uint8_t data[], uint32_t *data_length)
Reads a contiguous memory block via DMA.
kdriveExpress_API error_t kdrive_sp_ind_addr_sn_write(int32_t sp, const uint8_t sn[KDRIVE_SN_LEN], uint16_t new_ind_addr)
Writes the individual address of a device that matches the specified Serial Number.
kdriveExpress_API error_t kdrive_sp_network_param_write_systembroadcast(int32_t sp, uint16_t object_type, uint8_t prop_id, const uint8_t data[], uint32_t data_length)
Writes a parameter with the NetworkParameterWriteBroadcast service.
kdriveExpress_API error_t kdrive_sp_get_max_apdu_length(int32_t sp, uint32_t *max_apdu_length)
Gets the maximum apdu length for device services.
kdriveExpress_API error_t kdrive_sp_system_network_param_read(int32_t sp, uint16_t object_type, uint16_t prop_id, const uint8_t data[], uint32_t data_length, uint32_t wait_time, system_network_param_read_t items[], uint32_t *items_length)
Reads system parameter with the SystemNetworkParameterRead service.
kdriveExpress_API error_t kdrive_sp_ind_addr_prog_mode_write(int32_t sp, uint16_t new_ind_addr)
Writes the specified individual address to a device in Programming Mode (i.e.
kdriveExpress_API error_t kdrive_sp_domain_addr_sn_write(int32_t sp, const uint8_t sn[KDRIVE_SN_LEN], const uint8_t da[KDRIVE_DA_LEN])
Writes the Domain Address of a device This function validates that the domain address was successfull...
kdriveExpress_API error_t kdrive_sp_memory_write_without_verify(int32_t sp, uint16_t ind_addr, uint16_t memory_addr, const uint8_t input_data[], uint32_t input_data_length, uint8_t output_data[], uint32_t *output_data_length)
Writes data via DMA.
kdriveExpress_API error_t kdrive_sp_switch_prog_mode_property_based(int32_t sp, uint16_t ind_addr, bool_t enable)
Enable / Disable the programming mode (switches the learn LED).
kdriveExpress_API error_t kdrive_sp_device_descriptor_type0_read(int32_t sp, uint16_t ind_addr, uint16_t *mask_version)
Reads device descriptor 0 (mask version) from a device.
kdriveExpress_API error_t kdrive_sp_switch_prog_mode_memory_mapped(int32_t sp, uint16_t ind_addr, bool_t enable)
Enable / Disable the programming mode (switches the learn LED).
kdriveExpress_API error_t kdrive_sp_read_prog_mode(int32_t sp, uint16_t ind_addr, bool_t *enabled)
Reads the current programming mode.
kdriveExpress_API error_t kdrive_sp_prop_value_write(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, uint8_t nr_of_elems, uint16_t start_index, const uint8_t data[], uint32_t data_length)
Writes the value of a property to a device.
kdriveExpress_API error_t kdrive_sp_prop_value_read(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_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 The data buffer must exist (should be pre-allocated by the user)...
kdriveExpress_API error_t kdrive_sp_ext_memory_write(int32_t sp, uint16_t ind_addr, uint32_t memory_addr, const uint8_t data[], uint32_t data_length)
Reads data via A_Extended_Memory_Write service.
kdriveExpress_API error_t kdrive_sp_authorize_request(int32_t sp, uint16_t ind_addr, uint32_t key, uint8_t *level)
Sends an authorize request.
kdriveExpress_API error_t kdrive_sp_ind_addr_prog_mode_read(int32_t sp, uint32_t wait_time, uint16_t data[], uint32_t *data_length)
Reads the individual addresses of devices in Programming Mode (i.e.
kdriveExpress_API error_t kdrive_sp_load_state_read(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t *load_state)
Reads the load state via PropertyValueRead (PID_LOAD_STATE_CONTROL).
kdriveExpress_API error_t kdrive_sp_get_response_timeout(int32_t sp, uint32_t *timeout)
Gets the response timeout.
kdriveExpress_API error_t kdrive_sp_domain_addr_sn_read(int32_t sp, const uint8_t sn[KDRIVE_SN_LEN], uint16_t *ind_addr, uint8_t da[KDRIVE_DA_LEN])
Reads the Domain Address of a device that matches the specified Serial Number.
kdriveExpress_API error_t kdrive_sp_memory_read(int32_t sp, uint16_t ind_addr, uint16_t memory_addr, uint8_t number, uint8_t data[], uint32_t *data_length)
Reads data via DMA.
kdriveExpress_API error_t kdrive_sp_prop_value_write_without_verify(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, uint8_t nr_of_elems, uint16_t start_index, const uint8_t input_data[], uint32_t input_data_length, uint8_t output_data[], uint32_t *output_data_length)
Writes the value of a property to a device.
kdriveExpress_API error_t kdrive_sp_are_ext_memory_services_used(int32_t sp, bool_t *ext_used)
Gets whether the memory block services are use the (new) extended memory services or the 'normal' mem...
kdriveExpress_API error_t kdrive_sp_restart_device_type1(int32_t sp, uint16_t ind_addr, uint8_t erase_code, uint8_t channel_number, uint8_t *error_code, uint16_t *process_time)
Restarts the device using restart (type 1)
struct property_description_t property_description_t
Structure holding a property description.
struct ext_property_description_t ext_property_description_t
Structure holding a extended property description.
kdriveExpress_API error_t kdrive_sp_domain_addr_prog_mode_write(int32_t sp, const uint8_t da[KDRIVE_DA_LEN])
Writes the Domain Address to a device in Programming Mode (i.e.
struct device_descriptor_type2_t device_descriptor_type2_t
Structure holding device descriptor 2 (easy channel information)
kdriveExpress_API bool_t kdrive_sp_release(int32_t sp)
Releases the ServicePort interface.
kdriveExpress_API error_t kdrive_sp_device_descriptor_type2_read(int32_t sp, uint16_t ind_addr, device_descriptor_type2_t *desc)
Reads device descriptor 2 (easy channel information) from a device.
kdriveExpress_API error_t kdrive_sp_read_prog_mode_memory_mapped(int32_t sp, uint16_t ind_addr, bool_t *enabled)
Reads the current programming mode via MemoryRead.
kdriveExpress_API error_t kdrive_sp_set_co(int32_t sp, bool_t connection_oriented)
Sets whether the device services are run as connection-oriented or connection-less.
kdriveExpress_API error_t kdrive_sp_ext_prop_description_read(int32_t sp, uint16_t ind_addr, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, uint16_t prop_index, ext_property_description_t *property_description)
Reads a property description from a device via A_PropertyExtDescription_Read service.
kdriveExpress_API error_t kdrive_sp_load_state_write_ex(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t load_event, const uint8_t additional_info[KDRIVE_LOAD_STATE_ADDITIONAL_INFO_LEN], uint8_t *load_state)
Writes the load state via PropertyValueWrite (PID_LOAD_STATE_CONTROL).
kdriveExpress_API error_t kdrive_sp_memory_write(int32_t sp, uint16_t ind_addr, uint16_t memory_addr, const uint8_t data[], uint32_t data_length)
Writes data via DMA.
kdriveExpress_API error_t kdrive_sp_read_prog_mode_property_based(int32_t sp, uint16_t ind_addr, bool_t *enabled)
Reads the current programming mode via PropertyValueRead.
kdriveExpress_API int32_t kdrive_sp_create(int32_t ap)
Creates an internal ServicePort interface This should be the first function called when working with ...
kdriveExpress_API error_t kdrive_sp_property_description_read(int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, uint8_t prop_index, property_description_t *property_description)
Reads a property description from a device.
#define kdriveExpress_API
Definition: kdrive_express_config.h:89
unsigned short uint16_t
16 bit unsigned char
Definition: kdrive_express_config.h:31
bool bool_t
Definition: kdrive_express_config.h:58
int int32_t
32 bit signed int
Definition: kdrive_express_config.h:35
unsigned int uint32_t
32 bit unsigned char
Definition: kdrive_express_config.h:32
int32_t error_t
Definition: kdrive_express_config.h:47
unsigned char uint8_t
8 bit unsigned char
Definition: kdrive_express_config.h:30
kdriveExpress Defines
#define KDRIVE_DA_LEN
The Length of a KNX Domain Address.
Definition: kdrive_express_defs.h:35
#define KDRIVE_SN_LEN
The Length of a KNX Serial Number.
Definition: kdrive_express_defs.h:34
#define KDRIVE_LOAD_STATE_ADDITIONAL_INFO_LEN
The length of the additional info in a A_LoadSate_Write service.
Definition: kdrive_express_services.h:28
Structure holding device descriptor 2 (easy channel information)
Definition: kdrive_express_services.h:178
uint8_t app_ver
application version
Definition: kdrive_express_services.h:181
uint8_t mgmt_profile
management profile
Definition: kdrive_express_services.h:182
uint16_t manufacturer
application manufacturer Code
Definition: kdrive_express_services.h:179
uint8_t ch_count_a
channel count type A
Definition: kdrive_express_services.h:183
uint16_t ch_code_c
channel code type C
Definition: kdrive_express_services.h:188
uint16_t ch_code_a
channel code type A
Definition: kdrive_express_services.h:184
uint8_t ch_count_c
channel count type C
Definition: kdrive_express_services.h:187
uint16_t app_id
application id
Definition: kdrive_express_services.h:180
uint8_t ch_count_d
channel count type D
Definition: kdrive_express_services.h:189
uint16_t ch_code_d
channel code type D
Definition: kdrive_express_services.h:190
uint16_t ch_code_b
channel code type B
Definition: kdrive_express_services.h:186
uint8_t ch_count_b
channel count type B
Definition: kdrive_express_services.h:185
Structure holding individual address, serial number, domain address for the DomainAddressProgModeRead...
Definition: kdrive_express_services.h:1363
uint8_t domain_address[KDRIVE_DA_LEN]
domain address
Definition: kdrive_express_services.h:1366
uint16_t ind_addr
individual address
Definition: kdrive_express_services.h:1364
uint8_t serial_number[KDRIVE_SN_LEN]
serial number
Definition: kdrive_express_services.h:1365
Structure holding a extended property description.
Definition: kdrive_express_services.h:448
uint16_t prop_id
property id
Definition: kdrive_express_services.h:449
uint8_t read_level
read access level
Definition: kdrive_express_services.h:456
uint8_t write_level
write access level
Definition: kdrive_express_services.h:457
bool_t write_enable
is write enable
Definition: kdrive_express_services.h:453
uint16_t main_dpt
main datapoint type
Definition: kdrive_express_services.h:451
uint16_t sub_dpt
sub datapoint type
Definition: kdrive_express_services.h:452
uint16_t max_nr_of_elems
max number of elements
Definition: kdrive_express_services.h:455
uint8_t pdt
property data type
Definition: kdrive_express_services.h:454
uint16_t prop_index
property index
Definition: kdrive_express_services.h:450
Structure holding a property description.
Definition: kdrive_express_services.h:254
uint8_t type
type
Definition: kdrive_express_services.h:258
uint8_t read_level
read access level
Definition: kdrive_express_services.h:260
uint8_t prop_index
property index
Definition: kdrive_express_services.h:256
uint16_t max_nr_of_elems
max number of elements
Definition: kdrive_express_services.h:259
uint8_t prop_id
property id
Definition: kdrive_express_services.h:255
bool_t write_enable
is write enable
Definition: kdrive_express_services.h:257
uint8_t write_level
write access level
Definition: kdrive_express_services.h:261
Structure holding individual address and test info and test result for the SystemNetworkParameterRead...
Definition: kdrive_express_services.h:1321
uint8_t test_info_result[10]
test info and test result
Definition: kdrive_express_services.h:1323
uint16_t ind_addr
individual address
Definition: kdrive_express_services.h:1322
uint32_t length
the length of test info and test result
Definition: kdrive_express_services.h:1324