kdriveExpress SDK 22.1.1
kdrive_express_services.h
Go to the documentation of this file.
1//
2// Copyright (c) 2002-2022 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
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
31extern "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
451{
463
464
479 uint16_t ind_addr,
480 uint16_t object_type,
481 uint16_t object_instance,
482 uint16_t prop_id,
483 uint16_t prop_index,
484 ext_property_description_t* property_description);
485
486/**************************************************************
487** Device Service: ExtendedPropertyValueRead
488***************************************************************/
489
510 uint16_t ind_addr,
511 uint16_t object_type,
512 uint16_t object_instance,
513 uint16_t prop_id,
514 uint8_t nr_of_elems,
515 uint16_t start_index,
516 uint8_t data[],
517 uint32_t* data_length);
518
519/**************************************************************
520** Device Service: ExtendedPropertyValueWrite
521***************************************************************/
522
541 uint16_t ind_addr,
542 uint16_t object_type,
543 uint16_t object_instance,
544 uint16_t prop_id,
545 uint8_t nr_of_elems,
546 uint16_t start_index,
547 const uint8_t data[],
548 uint32_t data_length,
549 uint8_t* return_code);
550
568 uint16_t ind_addr,
569 uint16_t object_type,
570 uint16_t object_instance,
571 uint16_t prop_id,
572 uint8_t nr_of_elems,
573 uint16_t start_index,
574 const uint8_t data[],
575 uint32_t data_length);
576
577/**************************************************************
578** Device Service: ExtendedFunctionPropertyCommand
579***************************************************************/
580
602 uint16_t ind_addr,
603 uint16_t object_type,
604 uint16_t object_instance,
605 uint16_t prop_id,
606 const uint8_t input_data[],
607 uint32_t input_data_length,
608 uint8_t* return_code,
609 uint8_t output_data[],
610 uint32_t* output_data_length);
611
612/**************************************************************
613** Device Service: FunctionPropertyStateRead
614***************************************************************/
615
637 uint16_t ind_addr,
638 uint16_t object_type,
639 uint16_t object_instance,
640 uint16_t prop_id,
641 const uint8_t input_data[],
642 uint32_t input_data_length,
643 uint8_t* return_code,
644 uint8_t output_data[],
645 uint32_t* output_data_length);
646
647/**************************************************************
648** Device Service: MemoryRead
649***************************************************************/
650
668 uint16_t ind_addr,
669 uint16_t memory_addr,
670 uint8_t number,
671 uint8_t data[],
672 uint32_t* data_length);
673
674/**************************************************************
675** Device Service: MemoryWrite
676***************************************************************/
677
692 uint16_t ind_addr,
693 uint16_t memory_addr,
694 const uint8_t data[],
695 uint32_t data_length);
696
717 uint16_t ind_addr,
718 uint16_t memory_addr,
719 const uint8_t input_data[],
720 uint32_t input_data_length,
721 uint8_t output_data[],
722 uint32_t* output_data_length);
723
724/**************************************************************
725** Device Service: UserMemoryRead
726***************************************************************/
727
745 uint16_t ind_addr,
746 uint32_t memory_addr,
747 uint8_t number,
748 uint8_t data[],
749 uint32_t* data_length);
750
751/**************************************************************
752** Device Service: UserMemoryWrite
753***************************************************************/
754
767 uint16_t ind_addr,
768 uint32_t memory_addr,
769 const uint8_t data[],
770 uint32_t data_length);
771
792 uint16_t ind_addr,
793 uint32_t memory_addr,
794 const uint8_t input_data[],
795 uint32_t input_data_length,
796 uint8_t output_data[],
797 uint32_t* output_data_length);
798
799/**************************************************************
800** Device Service: ExtendedMemoryRead
801***************************************************************/
802
820 uint16_t ind_addr,
821 uint32_t memory_addr,
822 uint8_t number,
823 uint8_t data[],
824 uint32_t* data_length);
825
826/**************************************************************
827** Device Service: ExtendedMemoryWrite
828***************************************************************/
829
843 uint16_t ind_addr,
844 uint32_t memory_addr,
845 const uint8_t data[],
846 uint32_t data_length);
847
848/**************************************************************
849** Device Service: AuthorizeRequest
850***************************************************************/
851
863 uint16_t ind_addr,
864 uint32_t key,
865 uint8_t* level);
866
867/**************************************************************
868** Device Service: KeyWrite
869***************************************************************/
870
882 uint16_t ind_addr,
883 uint8_t* level,
884 uint32_t key);
885
886/**************************************************************
887** Device Service: IsIndividualAddressFree
888***************************************************************/
889
899 uint16_t ind_addr,
900 bool_t* is_free);
901
902/**************************************************************
903** Device Service: LoadStateRead
904***************************************************************/
905
917 uint16_t ind_addr,
918 uint8_t object_index,
919 uint8_t* load_state);
920
921/**************************************************************
922** Device Service: LoadStateWrite
923***************************************************************/
924
937 uint16_t ind_addr,
938 uint8_t object_index,
939 uint8_t load_event,
940 uint8_t* load_state);
941
955 uint16_t ind_addr,
956 uint8_t object_index,
957 uint8_t load_event,
958 const uint8_t additional_info[KDRIVE_LOAD_STATE_ADDITIONAL_INFO_LEN],
959 uint8_t* load_state);
960
961/**************************************************************
962** Device Service: ReadProgMode
963***************************************************************/
964
976 uint16_t ind_addr,
977 bool_t* enabled);
978
992 uint16_t ind_addr,
993 uint16_t mask_version,
994 bool_t* enabled);
995
1006 uint16_t ind_addr,
1007 bool_t* enabled);
1008
1019 uint16_t ind_addr,
1020 bool_t* enabled);
1021
1022/**************************************************************
1023** Device Service: SwitchProgMode
1024***************************************************************/
1025
1037 uint16_t ind_addr,
1038 bool_t enable);
1039
1040
1054
1067 uint16_t ind_addr,
1068 bool_t enable);
1069
1082 uint16_t ind_addr,
1083 bool_t enable);
1084
1085/**************************************************************
1086** Device Service: MemoryBlockRead
1087***************************************************************/
1088
1134 uint16_t ind_addr,
1135 uint32_t* memory_addr,
1136 uint8_t number,
1137 uint8_t data[],
1138 uint32_t* data_length);
1139
1140/**************************************************************
1141** Device Service: MemoryBlockWrite
1142***************************************************************/
1143
1165 uint16_t ind_addr,
1166 uint32_t memory_addr,
1167 const uint8_t data[],
1168 uint32_t data_length);
1169
1170/**************************************************************
1171** Broadcast Service: IndividualAddressProgModeRead
1172***************************************************************/
1173
1189 uint32_t wait_time,
1190 uint16_t data[],
1191 uint32_t* data_length);
1192
1193/**************************************************************
1194** Broadcast Service: IndividualAddressProgModeWrite
1195***************************************************************/
1196
1210
1211/**************************************************************
1212** Broadcast Service: IndividualAddressSerialNumberRead
1213***************************************************************/
1214
1225 const uint8_t sn[KDRIVE_SN_LEN],
1226 uint16_t* ind_addr);
1227
1228/**************************************************************
1229** Broadcast Service: IndividualAddressSerialNumberWrite
1230***************************************************************/
1231
1242 const uint8_t sn[KDRIVE_SN_LEN],
1243 uint16_t new_ind_addr);
1244
1245/**************************************************************
1246** Broadcast Service: NetworkParameterWriteBroadcast
1247***************************************************************/
1248
1263 uint16_t object_type,
1264 uint8_t prop_id,
1265 const uint8_t data[],
1266 uint32_t data_length);
1267
1268/**************************************************************
1269** System Broadcast Service: NetworkParameterWriteBroadcast
1270***************************************************************/
1271
1286 uint16_t object_type,
1287 uint8_t prop_id,
1288 const uint8_t data[],
1289 uint32_t data_length);
1290
1291/**************************************************************
1292** System Broadcast Service: SystemNetworkParameterWrite
1293***************************************************************/
1294
1307 uint16_t object_type,
1308 uint16_t prop_id,
1309 const uint8_t data[],
1310 uint32_t data_length);
1311
1312/**************************************************************
1313** System Broadcast Service: SystemNetworkParameterRead
1314***************************************************************/
1315
1324{
1330
1346 uint16_t object_type,
1347 uint16_t prop_id,
1348 const uint8_t data[],
1349 uint32_t data_length,
1350 uint32_t wait_time,
1352 uint32_t* items_length);
1353
1354/**************************************************************
1355** System Broadcast Service: DomainAddressProgModeRead
1356***************************************************************/
1357
1366{
1372
1385 uint32_t wait_time,
1387 uint32_t* items_length);
1388
1389/**************************************************************
1390** System Broadcast Service: DomainAddressProgModeWrite
1391***************************************************************/
1392
1405
1406/**************************************************************
1407** System Broadcast Service: DomainAddressSerialNumberRead
1408***************************************************************/
1409
1422 const uint8_t sn[KDRIVE_SN_LEN],
1423 uint16_t* ind_addr,
1425
1426/**************************************************************
1427** System Broadcast Service: DomainAddressSerialNumberWrite
1428***************************************************************/
1429
1441 const uint8_t sn[KDRIVE_SN_LEN],
1442 const uint8_t da[KDRIVE_DA_LEN]);
1443
1444#ifdef __cplusplus
1445}
1446#endif
1447
1448#endif /* KDRIVE_EXPRESS_SERVICES_INCLUDED == 1 */
1449#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:88
unsigned short uint16_t
16 bit unsigned char
Definition: kdrive_express_config.h:30
int int32_t
32 bit signed int
Definition: kdrive_express_config.h:34
unsigned int uint32_t
32 bit unsigned char
Definition: kdrive_express_config.h:31
int32_t error_t
Definition: kdrive_express_config.h:46
int32_t bool_t
Definition: kdrive_express_config.h:57
unsigned char uint8_t
8 bit unsigned char
Definition: kdrive_express_config.h:29
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:1366
uint8_t domain_address[KDRIVE_DA_LEN]
domain address
Definition: kdrive_express_services.h:1369
uint16_t ind_addr
individual address
Definition: kdrive_express_services.h:1367
uint8_t serial_number[KDRIVE_SN_LEN]
serial number
Definition: kdrive_express_services.h:1368
Structure holding a extended property description.
Definition: kdrive_express_services.h:451
uint16_t prop_id
property id
Definition: kdrive_express_services.h:452
uint8_t read_level
read access level
Definition: kdrive_express_services.h:459
uint8_t write_level
write access level
Definition: kdrive_express_services.h:460
bool_t write_enable
is write enable
Definition: kdrive_express_services.h:456
uint16_t main_dpt
main datapoint type
Definition: kdrive_express_services.h:454
uint16_t sub_dpt
sub datapoint type
Definition: kdrive_express_services.h:455
uint16_t max_nr_of_elems
max number of elements
Definition: kdrive_express_services.h:458
uint8_t pdt
property data type
Definition: kdrive_express_services.h:457
uint16_t prop_index
property index
Definition: kdrive_express_services.h:453
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:1324
uint8_t test_info_result[10]
test info and test result
Definition: kdrive_express_services.h:1326
uint16_t ind_addr
individual address
Definition: kdrive_express_services.h:1325
uint32_t length
the length of test info and test result
Definition: kdrive_express_services.h:1327